package com.ktgj.service.common.ygcd.domain.response;

import com.google.common.base.Strings;

/** 响应实体父类
 * @author wyj
 * @create 2021-10-21 10:26
 */
public class RespBase {
    // 接口是否成功
    public boolean IsSucess;
    //错误消息
    public String ErrorMessage;
    //异常信息
    public Exception Exception;
    //调用结果状态值
    public int code;
    //调用结果描述信息
    public String msg;
    //调用结果状态英文标识
    public String statusCode;


    public boolean isSucess() {
        return code == 1;
    }


    public String getErrorMessage() {
        if(Strings.isNullOrEmpty(msg)){
            return "";
        }else{
            return msg;
        }
    }

}
